// packageC/pages/takeoutCansel/takeoutCansel.js
const common = require('../../../public.js')
Page({

    /**
     * 页面的初始数据
     */
    data: {
        radio: '1',
        reasonOne:[
            '优惠力度不够',
            '优惠力度不够'
        ],
        reasonTwo:[
            '临时有事，我不想要了',
            '买错了/买多了/买少了',
            '忘点主食',
            '忘记使用红包/优惠券',
            '忘写备注',
            '忘记填发票',
            '地址/电话填写错误',
            '送达时间选错',
            '重复下单'
        ],
        activeOne:-1,
        activeOnes:-1,
        loadFlag:true,
        statusFlag:false
    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad(options) {
        const that = this
        setTimeout(()=>{
            that.setData({
                loadFlag:false,
                orderId: options.orderId ? options.orderId : '176721'
            },()=>{
                common.showToast('已取消订单')
            })
        },1000)
       
    },
    // 点击商户
    click_taps(e){
        const that = this
        let activeOne = e.currentTarget.dataset.index
        this.setData({
            activeOne
        },()=>{
            if(that.data.activeOne!=-1 && that.data.activeOnes!=-1){
               this.setData({
                statusFlag:true
               })
            }
        })
    },
    click_tapss(e){
        const that = this
        let activeOnes = e.currentTarget.dataset.index
        this.setData({
            activeOnes
        },()=>{
            if(that.data.activeOne!=-1 && that.data.activeOnes!=-1){
               this.setData({
                statusFlag:true
               })
            }
        })
    },
    clcik_qvss(){
        const that = this
      wx.navigateTo({
        url: `/packageC/pages/takeoutCanselDetail/takeoutCanselDetail?orderId=${that.data.orderId}`,
      })
    }
  
})